<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/service/warehousees/wareHouse.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/service/warehousees/wareHouse.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'wareHouseId',
                footer: "Foots",
                cnName: '仓库管理',
                name: 'warehousees/wareHouse',
                url: "base-write/api/wareHouse/",
                sortName: "wareHouseId"
            });
            const editFormFields = ref({"wareHouseName":"","wareHouseDepartment":"","wareHouseType":"","wareHouseLeaseTime":"","wareHouseIsDisable":"","wareHouseIsDefule":"","wareHouseAddr":"","wareHouseArea":"","wareHouseDesc":"","wareHouseLinkman":"","wareHousePhone":""});
            const editFormOptions = ref([[{"title":"仓库名称","field":"wareHouseName"},
                               {"dataKey":"department","data":[],"title":"所属部门","field":"wareHouseDepartment","type":"select"},
                               {"dataKey":"wht","data":[],"title":"所属类型","field":"wareHouseType","type":"select"}],
                              [{"title":"租赁时间","field":"wareHouseLeaseTime","type":"date"},
                               {"dataKey":"11","data":[],"title":"是否禁用","field":"wareHouseIsDisable","type":"radio"},
                               {"dataKey":"11","data":[],"title":"是否默认","required":true,"field":"wareHouseIsDefule","type":"radio"}],
                              [{"title":"仓库地址","required":true,"field":"wareHouseAddr"},
                               {"title":"仓库面积","required":true,"field":"wareHouseArea"},
                               {"title":"描述","required":true,"field":"wareHouseDesc"}],
                              [{"title":"联系人","required":true,"field":"wareHouseLinkman"},
                               {"title":"联系方式","required":true,"field":"wareHousePhone","type":"phone"}]]);
            const searchFormFields = ref({"wareHouseName":"","wareHouseDepartment":"","wareHouseType":""});
            const searchFormOptions = ref([[{"title":"仓库名称","field":"wareHouseName","type":"like"},{"dataKey":"department","data":[],"title":"所属部门","field":"wareHouseDepartment","type":"select"},{"dataKey":"wht","data":[],"title":"所属类型","field":"wareHouseType","type":"select"}]]);
            const columns = ref([{field:'wareHouseId',title:'仓库编号',type:'string',width:220,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'wareHouseName',title:'仓库名称',type:'string',sort:true,width:220,align:'left',sort:true},
                       {field:'wareHouseDepartment',title:'所属部门',type:'string',bind:{ key:'department',data:[]},sort:true,width:220,align:'left'},
                       {field:'wareHouseType',title:'所属类型',type:'string',bind:{ key:'wht',data:[]},sort:true,width:220,align:'left'},
                       {field:'wareHouseLeaseTime',title:'租赁时间',type:'datetime',sort:true,width:150,align:'left',sort:true},
                       {field:'wareHouseIsDisable',title:'是否禁用',type:'int',bind:{ key:'11',data:[]},sort:true,width:110,align:'left'},
                       {field:'wareHouseIsDefule',title:'是否默认',type:'int',bind:{ key:'11',data:[]},sort:true,width:110,require:true,align:'left'},
                       {field:'wareHouseAddr',title:'仓库地址',type:'string',sort:true,width:220,require:true,align:'left'},
                       {field:'wareHouseArea',title:'仓库面积',type:'string',sort:true,width:220,require:true,align:'left'},
                       {field:'wareHouseLinkman',title:'联系人',type:'string',sort:true,width:220,require:true,align:'left'},
                       {field:'wareHousePhone',title:'联系方式',type:'string',sort:true,width:220,require:true,align:'left'},
                       {field:'wareHouseIsDelete',title:'wareHouseIsDelete',type:'sbyte',width:110,hidden:true,require:true,align:'left'},
                       {field:'wareHouseDesc',title:'描述',type:'string',width:220,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
